package cn.seaboot.admin.sms.service;

import cn.seaboot.admin.sms.bean.SmsUser;
import cn.seaboot.admin.sms.dao.SmsUserDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
* Service
* 发送用户 [t_sms_user]
* @author Mr.css on 2018-6-20
*/
@Service
public class SmsUserService {

    @Resource
    private SmsUserDao smsUserDao;

    /**
     * 增
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int insert(SmsUser pojo){
        return smsUserDao.insert(pojo);
    }

    /**
     * 删
     *
     * @param id id
     * @return affected rows
     */
    public int deleteById(String id){
        return smsUserDao.deleteById(id);
    }

    /**
     * 改
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int updateById(SmsUser pojo) {
        return smsUserDao.updateSampleById(pojo);
    }

    /**
     * 查
     *
     * @param id id
     * @return pojo
     */
    public SmsUser queryById(String id){
        return smsUserDao.selectById(id);
    }

    /**
     * 查列表
     *
     * @param params 参数
     * @return list
     */
    public List<SmsUser> queryList(Map<String, Object> params) {
        return smsUserDao.selectList(params);
    }
}
